package app.netant.badbook.luoqiu;

import cn.lily.com.enviroment.Enviroment;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;
import app.netant.book.base.BaseRoot;

public class LuoQiuRoot extends BaseRoot {
	
	public LuoQiuRoot(){
		this.homeUrl = "http://www.aixiashu.com/xuanhuanxiaoshuo/1_2.html";
		this.pageUrl = "http://www.aixiashu.com/xuanhuanxiaoshuo/1_";
		this.tableKey = "aixiashu";
	}

	@Override
	public String buildUrl(int pageIdx) {
		return this.pageUrl + pageIdx+".html";
	}

	@Override
	public BasePage buildPage(String url) {
		return new LuoQiuPage(url);
	}

	@Override
	public BaseDetail buildDetail(String url) {
		return new LuoQiuDetail(url);
	}

	@Override
	public BaseEntity buildEntity() {
		return new LuoQiuEntity();
	}
	
	@Override
	public void afterEntity(BaseEntity entity) {
		
	}
	
	public static void main(String[] args) {
		
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		
		LuoQiuRoot root = new LuoQiuRoot();
		root.analyse(214);
		//root.excepCycle();
	}


	
}
